package Test1230;

public class Test15 {
    public static void main(String[] args) {
        // (15)定义实现m方法：求数组中最小的偶数
        int[] arr = {1,2,3,4,5};
        int min = m(arr);
        System.out.println(min);
    }
    public static int m(int[] arr) {
        int t = arr[0];
        for (int i :arr) {
            if (i%2==0&&i<t) {
                t = i;
            }
        }
        return t;
    }
}